<div class="admin-content" id="accordion">
	<div class="am-cf am-padding">
		<div class="am-fl am-cf">
			<strong class="am-text-primary am-text-lg">今日特价</strong> / <small>DailySpecial</small>
		</div>
	</div>
	
	
	<div class="am-panel-default">
		<div class="am-panel-hd">
			<h4 class="am-panel-title"
				data-am-collapse="{parent: '#accordion', target: '#do-not-say-0'}">
				激活</h4>
		</div>
		
		<div id="do-not-say-0" class="am-panel-collapse am-collapse">
			<div class="am-panel-bd">
		 		<div class="alert alert-info" style="width: 100%;">
		 			<ul class="am-avg-sm-2 am-avg-md-4 am-avg-lg-4 am-margin gallery-list">
						<li  ng-repeat="dailySpecial in page | filter:{'status':true} ">
						<!-- 强行去边框 -->
							<div class="am-img-bdrs am-img-thumbnail" ng-click="modify(dailySpecial)"   data-am-offcanvas="{target: '#doc-oc-demo3'}"  style="border: none;">
							    <div>
							    	<label>产品 : </label>
							    	<label ng-bind="dailySpecial.product.description"></label></div>
							    <div>
							    	<label>品类 : </label>
							    	<label ng-bind="dailySpecial.product.category.description"></label>
							    </div>
								<label ng-show=false ng-model="dailySpecial.id"></label>
								<div>
									<img
										class="am-img-thumbnail am-img-bdrs"
										ng-src="{{baseUrl+dailySpecial.imageId+formatImage}}" />
								</div>
								<div>
									<label>描述  ：{{ dailySpecial.description }}</label>
								</div>
								<div>
							    	<label>价格 : </label>
							    	<label ng-bind="dailySpecial.price"></label></div>
							    <div>
							    	<label>修改时间 : </label>
							    	<label>{{ dailySpecial.modifyTime |  date : 'yyyy-MM-dd hh:mm' }}</label>
							    </div>
							</div>
							<div>
							<!-- 加一个filter -->
								<button class="btn am-btn-primary" ng-click="cancelActivation(dailySpecial)">取消激活</button>
							</div>	
						  </li>
						    <!--增加产品  -->
						  <li>
						   <div ng-model="formdata">
							 <div>
							 <!-- 增加  effect: 'push' 可以推动-->
							   	<i ng-click="add()" data-am-offcanvas="{target: '#doc-oc-demo3'}"
							   	 class="am-icon-plus am-btn am-btn-default am-btn-xl am-round"></i>
							 </div>
							</div>
						  </li><!-- 增加产品end -->
					</ul>
				</div>
			</div>
		</div>
	</div>
	<!-- 激活 -->
	<div class="am-panel-default">
		<div class="am-panel-hd">
			<h4 class="am-panel-title"
				data-am-collapse="{parent: '#accordion', target: '#do-not-say-1'}">
				未激活</h4>
		</div>
		
		<div id="do-not-say-1" class="am-panel-collapse am-collapse">
			<div class="am-panel-bd">
		 		<div class="alert alert-info">
		 			<ul class="am-avg-sm-2 am-avg-md-4 am-avg-lg-4 am-margin gallery-list">
						<li  ng-repeat="dailySpecial in page | filter : {'status':false} ">
						<!-- 强行去边框 -->
							<div class="am-img-bdrs am-img-thumbnail" ng-click="modify(dailySpecial)"   style="border: none;" data-am-offcanvas="{target: '#doc-oc-demo3'}">
							    <div>
							    	<label>产品 : </label>
							    	<label ng-bind="dailySpecial.product.description"></label></div>
							    <div>
							    	<label>品类 : </label>
							    	<label ng-bind="dailySpecial.product.category.description"></label>
							    </div>
								<label ng-show=false ng-model="dailySpecial.id"></label>
								<img
									class="am-img-thumbnail am-img-bdrs"
									ng-src="{{baseUrl+dailySpecial.imageId+formatImage}}" />
								<label>描述  ：{{ dailySpecial.description }}</label>
							</div>
							<div>
							<!-- 加一个filter -->
								<button class="btn am-btn-primary" ng-click="Activation(dailySpecial)">激活</button>
							</div>	
						  </li>
					</ul>
				</div>
			</div>
		</div>
	</div>
</div>
<!-- =================================================================================================================== -->
<div id="doc-oc-demo3" name="{{open}}" class="am-offcanvas" style="touch-action: pan-y; -webkit-user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);">
	<div class="am-offcanvas-bar am-offcanvas-bar-flip am-offcanvas-bar-overlay">
		<!--content start  -->
		<div class="am-offcanvas-content">
			  <div class="am-cf am-padding">
						      <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">dailySpecial</strong>
						      	<a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close="">×</a>
						      </div>
						    </div>
					
					    <hr>
					
					    <div class="am-g" ng-model="ndailySpecial">
					    
					      <div class="am-u-sm-12 am-u-md-4 am-u-md-push-8">
					        <div class="am-panel am-panel-default">
					          <div class="am-panel-bd">
					            <div class="am-g">
					              <div class="am-u-md-4">
					                <img class="am-img-circle am-img-thumbnail" data-am-modal="{target: '#my-actions'}" ng-click="pass(ndailySpecial.imageId)"
					                  ng-src="{{ ndailySpecial.imageId? baseUrl+ndailySpecial.imageId+formatImage : 'sad.png' }}"
					               	 alt="" />
					              </div>
					              <div class="am-u-md-8">
					               <div class="am-form-group">
					                  	<input type="file" ng-file-select="onFileSelect($files)"/>
					                    <p class="am-form-help">请选择要上传的文件...</p>
					                </div>
					              </div>
					            </div>
					          </div>
					        </div>
					      </div>
					      
					      <!--表单验证  -->
					
					      <div class="am-u-sm-12 am-u-md-8 am-u-md-pull-4">
					        <form class="am-form am-form-horizontal" name="formName">
					           <div class="am-form-group">
					            <label  class="am-u-sm-3 am-form-label">产品品类</label>
					            <!--存储品类信息  -->
					            <div class="am-u-sm-9">
					            <!-- 初始化产品品类  -->
					              <select required data-ng-disabled="controlC" ng-model="cselected" ng-change="getProducts(cselected)"  ng-options="category.id as category.description for category in productCategorys">
					              	<option value="">--请选择--</option>
					              </select>
					            </div>
					          </div>
					          
					          <div class="am-form-group">
					            <label  class="am-u-sm-3 am-form-label">产品</label>
					            <div class="am-u-sm-9">
					              <select required data-ng-disabled="controlC" ng-model="pselected" ng-options="product.id as product.description for product in products">
					              	<option value="">-请选择-</option>
					              </select>
					            </div>
					          </div>
					        
					          <div class="am-form-group">
					            <label  class="am-u-sm-3 am-form-label">描述</label>
					            <div class="am-u-sm-9">
					              <label ng-show=false ng-model="ndailySpecial.id"></label>
					              <input required ng-model="ndailySpecial.description" placeholder="请输入描述" type="text">
					            </div>
					          </div>
					
					          <div class="am-form-group">
					            <label  class="am-u-sm-3 am-form-label">单价</label>
					            <div class="am-u-sm-9">
					              <input required ng-model="ndailySpecial.price"   placeholder="输入单价" type="number">
					            </div>
					          </div>
					          
					         <div class="am-form-group">
					            <label  class="am-u-sm-3 am-form-label">修改时间</label>
					            <div class="am-u-sm-9">
					              <input  class="am-form-field" value="{{ ndailySpecial.modifyTime | date : 'yyyy-MM-dd HH:mm:ss'}} " readonly=true>
					            </div>
					          </div>
					
					          <div class="am-form-group">
					            <div class="am-u-sm-9 am-u-sm-push-3">
					              <button ng-disabled="formName.$invalid" type="button" class="am-btn am-btn-primary" ng-click="submitdata(ndailySpecial)">保存修改</button>
					            </div>
					          </div>
					        </form>
					      </div>
					    </div>
			<button class="am-btn am-btn-primary doc-oc-js" data-rel="close">关闭侧边栏</button>

<script>
  $(function() {
    var id = '#doc-oc-demo3';
    var $myOc = $(id);
    console.log($myOc[0].attributes.name.value);
    $('.doc-oc-js').on('click', function() {
	  $myOc[0].attributes.name.value="";
      $myOc.offCanvas($(this).data('rel'));
      $myOc[0].attributes.name.value="open";
    });
	
  });
</script>
		</div><!--content end  -->
	</div>
</div>